import { Container, Sprite } from "pixi.js";

export enum ViewState {
    WaitLoad,
    Loading,
    Showing,
    WaitDestory,
    Destoryed,
}

export enum EntityType {
    Group,
    Sprite,
    Prefab,
}

export type PixijsEntity = {
    position: { x: number; y: number; }
    size?: { width: number; height: number;}
    rotation: number;
    name: string;
    url?: string
    view?: Sprite | Container;
    viewState?: ViewState,
    selected?: boolean;
    drag?: boolean;
    resize?: number;
    hover?: boolean;
    locked?: boolean;
    group?:string;
    visible?: boolean;
    type?: EntityType;
    children: PixijsEntity[];
    parent?: PixijsEntity;
    anchor: {x: number, y: number},
    expanded?: boolean,
}